
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<link rel="stylesheet" type="text/css" href="../marvinmanuals.css">
<title>Homology groups in Markush structures</title>
</head>

<body>
<h1>Homology groups in Markush structures</h1>

<p>Currently JChem enables the searching of Markush structures containing 
homology groups only with specific molecule queries (with no query 
features). Homology groups are supported only on the target side; query 
side support will be implemented in a future version, as well as 
properties of the homology groups constraining the possible structures. 


<h2><a class="anchor" name="definition">Definition of the groups</a></h2>

The homology groups in Markush structures are represented by pseudo atoms 
labelled with the common chemical annotation of the groups. Most groups have alias names
which allow shorter names. The names 
are case insensitive, spaces might be inserted. The pseudo atoms can be most easily drawn in Marvin Sketch 
using the Homology Groups 
<a href="../sketch/sketch-basic.html#templates">template group</a>.</p>

There are two major types of homology groups regarding their way of definition:
<ol>
        <li><b>Built-in groups</b> are defined by specific structural properties of the 
		group. These groups are not enumerated during searching, but the query structure 
		is recognized as fulfilling the requirements for such a structure. The possible 
		number of covered structures is usually infinite, unless the number of atoms is 
		limited. Examples of built-in groups are alkyl, aryl, heterocycle, etc.</li>
        <li><b>User-defined groups</b> are explicitly defined and only the listed
        structures can match these homology groups. The definition is given in the 
		form of an R-group definition, and any of the generic features discussed in the 
		Markush
		chapter can be used in the definition. These definitions can be customized by 
		the user, and may be context-specific. (E.g. protecting group definition 
		depends on which functional group it is protecting.)</li>
</ol>

<h3><a class="anchor" name="builtin">Built-in groups</a></h3>

Table 1. shows the properties of built-in groups.
Built in groups are recognized some specific features, these are shown in the table
as "compulsory" parts. Optional parts are structures that are not necessary can be 
part of the structure that matches on the homology group. "Incomplete case" means structures
that are substructures of structures that would represent a homology group.  
It is required that even such incomplete structures can be extended to a complete homology
group. <a href="#searchoptions">Search options</a> regulate if incomplete structures can match on 
a homology group or complete structures are required.      
<p> The "Example" column shows complete structures representing the homology groups. 

<p>
<b>Table 1.</b> Built-in groups
</p>
<table border="0" cellspacing="0" cellpadding="5" class="grid" summary="" rules="all">
        <thead>
        <tr>
            <th>Group name (alias names)</th>
            <th width="200">Compulsory</th>
            <th width="200">Optional</th>
            <th width="200">Incomplete case</th>
            <th>Example</th>
         </tr>
    </thead>
    <tbody>
        <tr>    
            <td>Alkyl <br>(chk)</td>
            <td>- minimum of one carbon atom<br>
                - only carbon and hydrogen atoms<br>
                - single bonds<br>
                - no ring bonds</td>
            <td>substitution at arbitrary position(s)</td>
            <td>same requirements</td>
        <td align="center"><img src="Homology_files/alkyl.jpg" alt="" width="234" height="116"></td>
        </tr>
        <tr>
            <td>Alkenyl <br>(che)</td>
            <td>- at least one double bond<br>
                - minimum of 2 carbon atoms<br>
                - otherwise same as for Alkyl</td>
            <td>same as above</td>
            <td>same as at compulsory, but the matching structure does not need to have any double bond</td>
	         <td align="center"><img src="Homology_files/alkenyl.jpg" alt="" width="80" height="57"></td>
        </tr>
        <tr>
            <td>Alkynyl <br>(chy)</td>
            <td>- at least one triple bond<br>
                - minimum of 2 carbon atoms<br>
                - otherwise same as for Alkyl</td>
            <td>same as above, double bond</td>
            <td>same as at compulsory, but the matching structure does not need to have any triple bond</td>
	         <td align="center"><img src="Homology_files/alkynyl.jpg" alt="" width="143" height="155"></td>
        </tr>
        <tr>
            <td>Cycloalkyl <br>(cyc)</td>
            <td>- monocyclic or fused aliphatic rings<br>
                - only carbon and hydrogen atoms</td>
            <td>- substitution by (saturated) alkyl chains<br>
                - double or triple bonds in the ring but not aromatic<br>
                - several connection points but all must be on a ring
            (can't have external connection on an alkyl chain)</td>
            <td>- any carbon structure without aromatic bonds<br>
                - the substituting alkyl chain can be unsaturated</td>
            <td align="center"><img src="Homology_files/cycloalkyl.jpg" alt="" width="172" height="108"></td>
        </tr>
        <tr>
            <td>Aryl <br>(ary)</td>
            <td>- monocyclic or fused rings<br>
                - among this rings at least one should be aromatic<br>
                - only carbon and hydrogen atoms</td>
            <td>- substitution by (saturated) alkyl chains<br>
                - double bonds/triple bonds in the aliphatic rings<br>
                - several connection points but all must be on an
    aromatic ring (can't have external connection on an alkyl chain or on an
    aliphatic ring)</td>
            <td>- similar to cycloalkyl but the atoms can have aromatic bonds:<br>
                - any carbon structure where the external connection is on an 
                atom that has aromatic bond or has only one bond.<br>
                - the matching structure doesn't need to have a ring.</td>
            <td align="center"><img src="Homology_files/aryl.jpg" alt="" width="183" height="147"></td>
        </tr>
        <tr>
            <td>AliphaticHeterocyclyl <br>(het, heterocycle, heterocyclyl)</td>
            <td>- similar to a cycloalkyl but the ring(system) should
    contain at least one hetero atom<br>
                - no hetero atoms outside the rings</td>
            <td>same as cycloalkyl</td>
            <td>similar to cycloalkyl but here hetero atoms are accepted as well, which means
any structure without aromatic bonds</td>
            <td align="center"><img src="Homology_files/heterocycle.jpg" alt="" width="64" height="74"></td>

        </tr>
        <tr>
            <td>Heteroaryl <br>(hea)</td>
            <td>- similar to aryl but the aromatic ring(system) should contain at least one
            hetero atom.<br>
                - no hetero atoms outside the rings</td>
            <td>same as aryl</td>
            <td>Similar to aryl but here hetero atoms are accepted as well. Condition for the
externally connecting atom holds as in case of aryl.</td>
            <td align="center"><img src="Homology_files/heteroaryl.jpg" alt="" width="110" height="81"></td>
        </tr>
        <tr>
            <td>FusedHetero <br>(hef)</td>
            <td>- Fused ringsystem having at least one hetero atom.</td>
            <td>same as aryl</td>
            <td>Any structure having hetero, carbon and hydrogen atoms, with any bonds.</td>
            <td align="center"><img src="Homology_files/fusedhetero.jpg" alt=""></td>
        </tr>
        <tr>
            <td>Unknown group <br>(unk)</td>
            <td align="center">-</td>
            <td>Any structure. Unknown structures are not enumerated during Markush enumeration.</td>
            <td align="center">-</td>
            <td align="center">-</td>
        </tr>
        <tr>
            <td>Metal <br>(mx)</td>
            <td>Any metal</td>
            <td align="center">-</td>
            <td align="center">-</td>
            <td align="center">U, K, Fe, Na, Ni, Al</td>
        </tr>
        <tr>
            <td>AlkaliMetal <br>(amx)</td>
            <td>Alkali and alkaline earth metals</td>
            <td align="center">-</td>
            <td align="center">-</td>
            <td align="center">Na, K, Ca, Mg</td>
        </tr>
        <tr>
            <td>OtherMetal <br>(a35)</td>
            <td>Group IIIa-Va metals</td>
            <td align="center">-</td>
            <td align="center">-</td>
            <td align="center">Al, Ga</td>
        </tr>
        <tr>
            <td>TransitionMetal <br>(trm)</td>
            <td>transition metals excluding Lanthanum</td>
            <td align="center">-</td>
            <td align="center">-</td>
            <td align="center">Fe, Ni, Zn, Co, Hg, W</td>
        </tr>
        <tr>
            <td>Lanthanide <br>(lan)</td>
            <td>lanthanides (including Lanthanum)</td>
            <td align="center">-</td>
            <td align="center">-</td>
            <td align="center">Nd, Ce, Pr</td>
        </tr>
        <tr>
            <td>Actinide<br>(act)</td>
            <td>actinides (including Actinium)</td>
            <td align="center">-</td>
            <td align="center">-</td>
            <td align="center">U, Th, Pa</td>
        </tr>
    </tbody>
</table>

<h3>User-defined homology groups</h3>

<p>These homology groups are predefined and are represented by R-group 
definitions. During search the pseudo atoms are translated to the 
corresponding R-group definitions.

<!--<p>Location of the definitions: in chemaxon/enumeration/homology/user_def_groups in the jar file.
The name implies that these groups are represented by these definitions during
search and enumeration as well. For the enumeration of built-in structures see section enumeration.

<p>The user can override these definition, just has to copy the definition from the
jar file to the user chemaxon directory into the directory: homology/user_def_groups.
You can override these files which will affect searching groups.
-->

<p>The group definitions are <a href="#customizedef">customizable</a>, the user can override them or 
can make new definitions as well. Group names are treated case insensitive, 
but in case sensitive file systems the definition files should be lowercase.

<!-- <p>Technically, the group definitions are handled in a conversion step before the 
search, in which the homology group is replaced by the R-atom. This atom receives
an alias string, which shows the name of the converted homology group, and the
R-group index. Internally this alias helps to distinguish between originally existing
R-groups and R-groups resulting from homology conversion.
 -->
<p>User defined groups readily available in the system are the following:

<h4>Halogen</h4>

Halogen elements: F, Cl, I and Br.
<br>
JChem's group name: halogen
<br>
alias names: hal, x


<h4>Protecting</h4>

<p>Protecting groups' definition file contains several definitions, 
each for protecting different functional groups. The protected functional
group is defined by the neighbourhood of the R-atom. When the R-atom has the same
neighbourhood as the "protecting" pseudo atom, then the group is replaced 
by the R-atom.</p>
<p>
The conversion processes the group definitions in their order in the file. 
This means that more specific environments should be placed earlier.
For example, a carboxyl protecting group definition should precede an 
alcohol definition, otherwise the alcohol definitions will be applied 
instead.
Currently they are located in the following order:
<ol>
	<li>amino</li>
	<li>carboxyl</li>
	<li>alcohol</li>
</ol>

<!--See example definition. (rename it to mrv.)-->

<p>Currently the system can't handle protecting groups having more than one
attachment point, or groups where the heavy atoms of the functional group 
should be changed by the substitution.
The readily available definitions contain amine, carboxyl and hydroxyl 
protecting groups.
<br>
JChem's group name: protecting
<br>
alias names: prt

Some examples with different functional groups protected can be found on Table 2.

<p>
<b>Table 2.</b> Protecting group examples
</p>
<p>
<table border="0" cellspacing="0" cellpadding="5" class="grid" summary="" rules="all">
        <tr>
            <td align="center"><b>Protecting group</b></td>
            <td align="center" colspan="3"><b>Represented examples</b></th>
         </tr>
        <tr>
            <td align="center"><img src="Homology_files/protectingN.jpg" alt="" width="114" height="74"></td>
            <td align="center"><img src="Homology_files/protectingN1.jpg" alt="" width="80" height="66"></td>
            <td align="center"><img src="Homology_files/protectingN2.jpg" alt="" width="114" height="96"></td>
            <td align="center"><img src="Homology_files/protectingN3.jpg" alt="" width="140" height="91"></td>
        </tr>
        <tr>
            <td align="center"><img src="Homology_files/protectingO.jpg" alt="" width="99" height="54"></td>
            <td align="center"><img src="Homology_files/protectingO1.jpg" alt="" width="77" height="123"></td>
            <td align="center"><img src="Homology_files/protectingO2.jpg" alt="" width="98" height="87"></td>
            <td align="center"><img src="Homology_files/protectingO3.jpg" alt="" width="73" height="93"></td>
        </tr>
        <tr>
            <td align="center"><img src="Homology_files/protectingCOO.jpg" alt="" width="124" height="69"></td>
            <td align="center"><img src="Homology_files/protectingCOO1.jpg" alt="" width="89" height="61"></td>
            <td align="center"><img src="Homology_files/protectingCOO2.jpg" alt="" width="123" height="72"></td>
            <td align="center"><img src="Homology_files/protectingCOO3.jpg" alt="" width="96" height="68"></td>
        </tr>
</table>


<h4>Acyl</h4>

<p>Residue left after removal of one or more OH groups from an acid. Currently it's
implemented only for one attachment point.
<br>
JChem's group name: acyl
<br>
alias names: acy

<h4>Any group</h4>

<p>The union of all other homology groups except acyl, unknown and protecting.
<br>
JChem's group name: any
<br>
alias names: xx

<h2>Search options and properties</h2>

Search options regulating the search behaviour are also available:

<h3><a class="anchor" name="searchoptions">Search Options</a></h3>

<p>Currently there is one regulating option: 'completeHG', which specifies if the
part of the query side structure matching on the given group should represent an
entire homology group or if substructures are also accepted. Of course in the incomplete
case an entire structure can also match on the given homology group.
<br>For example, if completeHG is set to true (default) an alkyl chain can't match on a cycloalkyl
group, only a ring (system). The detailed behaviour is found at the definition of the groups.
And example is shown on Table 3.

<p>
<b>Table 3.</b> Complete and incomplete structures of homology groups</p>
<p>

<table border="0" cellspacing="0" cellpadding="5" class="grid" summary="">
    <tr>
        <td rowspan="2" align="center">
            <b>target</b>
        </td>
        <td rowspan="2" align="center">
            <b>query</b>
        </td>
        <td colspan="2" align="center">
            <b>hit</b>
        </td>
    </tr>

    <tr>

        <td align="center">
            <em>completeHG:y</em>
        </td>
        <td align="center">
            <em>completeHG:n</em>
        </td>
    </tr>
    <tr>

    <tr>
        <td align="center" rowspan="2">
            <img src="Homology_files/cycloalkylt.jpg" alt="" width="82" height="55">
        </td>
        <td align="center"><img src="Homology_files/cycloalkylq1.jpg" alt="" width="156" height="162"></td>
        <td align="center"><img src="Query_files/yes.png" width="24" height="24" alt=""></td>
        <td align="center"><img src="Query_files/yes.png" width="24" height="24" alt=""></td>
    </tr>
    <tr>
        <td align="center"><img src="Homology_files/cycloalkylq2.jpg" alt="" width="248" height="122"></td>
        <td align="center"><img src="Query_files/no.png" width="24" height="24" alt=""></td>
        <td align="center"><img src="Query_files/yes.png" width="24" height="24" alt=""></td>
    </tr>
</table></p>



<h2>Enumeration</h2>
To enable the enumeration of homology groups, the homology enumeration option of 
Markush enumeration has to be switched on. Otherwise the homology groups are kept 
as pseudo atoms. This latter option might be useful for showing that these 
structures can't be fully enumerated.

<h3>Built-in groups</h3>

<p>For the built-in types, example R-group definitions specify the enumerable 
library, with the same technology as user-defined groups. These structures are
characteristic to the homology group and encompass simple and large structures 
as well. The group definitions are <a href="#customizedef">customizable</a>.

<p>We have to emphasize, that these definitions are only used for enumeration 
and do not affect searching. As
noted earlier, arbitrary structures fulfilling the requirements for the homology
group will match such a target.

<!--<p>The definition files are located in the following directory:
chemaxon/enumeration/homology/enumeration_only in the jar file.

<p>These files can be copied to the users "chemaxon" (or ".chemaxon") directory as
written in case of user-defined groups. The name of the definition's directory
in the user's directory should be "homology/enumeration_only".
-->

<h3><a class="anchor" name="userdefenum">User-defined groups</a></h3>
<p>
The enumeration of user defined homology groups use the same (<a href="#customizedef">customizable</a>) 
R-group definitions as searching.

<h3><a class="anchor" name="customizedef">Customizing rgroup definitions</a></h3>
Location of the definitions: 
<dl>
	<dt>User defined groups</dt>
	<dd>Directory <i>chemaxon/enumeration/homology/user_def_groups</i> in the jar file.
The name implies that these groups are represented by these definitions during
search and enumeration as well.</dd>
	<dt>Built-in groups</dt>
	<dd>Directory <i>chemaxon/enumeration/homology/enumeration_only</i> in the jar file.
The name implies that these groups are represented by these definitions during
enumeration only.</dd>
</dl> 

The definition files are in lower case, customized file names have to be in
lower case as well. 
Overriding of these definition occurs by copying the definition from the
jar file to the user <i>(.)chemaxon</i> directory into the subdirectory: <i>homology/user_def_groups</i>
(or <i>homology/enumeration_only</i> for built-in groups).
Overriding these files will affect searching/enumeration in case of 
user defined groups and the enumeration in case of built-in groups. <br>
Adding a new group can be achieved by creating/copying a new mrv file containing an R atom
and the definitions of the group. The name of the new group is specified by 
the name of the file. 
<BR> The overridden definition or the newly added group can also be dependent on the neighbourhood 
(context-sensitive) as in the case of protecting groups.
<BR>
If the user would like to have different definitions for searching and enumeration of a
 user-defined group, then a separate file should be specified in the "enumeration_only" dictionary.
 In this case the content of the "<i>user_def_groups</i>" will be used during searching and 
 the content of the "<i>enumeration_only</i>" for enumeration. 
<br>
An example for overriding an amino protecting group definition may consist of the following
 steps:
<ol>
	<li>Copy protecting group definition to the users (.)chemaxon library: e.g. from 
	.../jchem.jar/chemaxon/enumeration/homology/user_def_groups/protecting.mrv to 
	/home/{USER_NAME}/.chemaxon/homology/user_def_groups/</li>
	<li>Open the newly copied file in the user's directory with msketch.</li>
	<li>A dialog appears asking the index of molecule to open. Enter 1 because 
	this contains the amino protecting group definition. If the proper molecule number is
	not known, all the definitions can be displayed using mview.</li>
	<li>Overwrite the structures, e.g. delete the FMOC group, see Table 4. 
	The new definition will be used in searching and enumeration, see Table 4.</li>
</ol>

If a definition is overridden it comes into effect immediately, however the addition of a new group 
requires a restart of the Java Virtual Machine. 

<p>
<b>Table 4.</b> Overriding amino protecting group definitions.
<p>

<table border="0" cellspacing="0" cellpadding="5" class="grid" summary="">
	<tr>
		<td align="center"><b>overwriting the definition</b></td>	
		<td align="center"><b>sample markush file</b></td>	
		<td align="center"><b>enumerations</b></td>	
	</tr>
	<tr>
		<td align="center"><img src="Homology_files/protectingOverr.jpg" alt="" width="453" height="441"></td>	
		<td align="center"><img src="Homology_files/protectingSample.png" alt="" width="86" height="70"></td>	
		<td align="center"><img src="Homology_files/protectingEnum.jpg" alt="" width="356" height="526"></td>	
	</tr>
</table>
<p>
</p>

<h2>Planned improvements: Properties of homology groups</h2>

These will be implemented in a future version. They regulate the properties of
the individual homology groups independently. They include the followings (with
the group to which it may be applied):
<ol>
    <li>monocyclic/fused, default: both are allowed, for all ring type groups</li>
    <li>saturated, default false, for cycloalkyl and heterocycle groups</li>
    <li>chain, default false, for alkyl, alkenyl, alkynyl</li>
</ol>


</body>
</html>
